<script type="text/javascript">
function ChangePageSize(controlToPaginate, paginatorSubId)
{
	eventSource = document.getElementsByName(controlToPaginate+'[eventSource_itemsPerPage]')[0]
	if (eventSource != null)
		eventSource.value = paginatorSubId
	Paginate(0, controlToPaginate)
}
function Paginate(block, controlToPaginate)
{
	if ( block != null ) document.getElementsByName(controlToPaginate+'[block]')[0].value = block
	SubmitForm(null)
}
function SortTable(controlToSort, sortColumn, sortDirection)
{
	if (controlToSort == null) controlToSort = ''
	if (sortColumn!=null) document.getElementsByName(controlToSort+'[sortColumn]')[0].value = sortColumn
	if (sortDirection!=null) document.getElementsByName(controlToSort+'[sortDirection]')[0].value = sortDirection
	SubmitForm(null)
}
function SubmitForm(actionToInvoke, parameters)
{
	for(var key in parameters)
	{
		document.getElementById(key).value = parameters[key]
	}
	if (actionToInvoke == null) actionToInvoke = ''
	var formAction = document.getElementById('formaction')
	if (formAction != null) formAction.value = actionToInvoke
	var mainform = document.getElementById('myform')
	if (formAction.value == actionToInvoke) mainform.submit()
	return false
}
function SubmitFormNoAction()
{
	SubmitForm(null, null)
}
</script>